Skip to content

fix(github-backup): /github null body 202 + fail-closed secret guard (#6951) - #6952

Merged
dezren39 merged 1 commit into
mainfrom
creator-b/6951-ghb-github-endpoint
Nov 7, 2026
Merged

dezren39 merged 1 commit into
mainfrom
creator-b/6951-ghb-github-endpoint

Conversation

@dezren39

@dezren39 dezren39 commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Fixes #6951.

  • POST /github: a signed JSON null body now returns 202 no repository in payload (optional-chained payload?.repository) instead of throwing TypeError out of the handler — the same disposition every other non-object shape already got.
  • POST /github: an unset/empty GITHUB_WEBHOOK_SECRET now returns an explicit 500 webhook secret not configured before any HMAC work, instead of a zero-length-key DOMException per delivery. Fail-closed: no signature (including an empty-key HMAC) is accepted and no KV write occurs.

Tests: 3 new cases in infra/github-backup/worker/test/index.test.mjs (signed event control + wrong-signature 401, signed null body, unset/empty secret). Suite 8/8 on the branch; the 2 new regression tests fail pre-fix. Post-fix probe (~/git/fleet/probe-ghb-github, real module): all controls unchanged, null → 202, missing/empty secret → 500 naming the config, 0 KV writes.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 7, 2026 20:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T20:26:56.996051Z 31c6e25 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit 56b6a47 into main Nov 7, 2026
1 of 3 checks passed
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

github-backup(worker): POST /github crashes on a signed JSON null body, and an unset/empty webhook secret crashes every delivery naming nothing

1 participant